<!DOCTYPE html>
<html>
<head>
    <title>用户订单管理</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="!detail&&showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.orderSn" @on-enter="query" placeholder="订单号"/>
                </i-col>
               <!-- '订单状态：0:已完成 1:已取消 2:待支付',-->
                <i-col span="4">
                    <i-select v-model="q.orderStatus" placeholder="订单状态">
                        <i-option value="0">已完成</i-option>
                        <i-option value="1">已取消</i-option>
                        <i-option value="2">待支付</i-option>
                    </i-select>
                </i-col>
                <i-button @click="query">查询</i-button>
            </div>
           <!-- <div class="buttons-group">
                #if($shiro.hasPermission("order:sendGoods"))
                <i-button type="warning" @click="sendGoods">发货</i-button>
                #end
                #if($shiro.hasPermission("order:confirm"))
                <i-button type="error" @click="confirm">确认收货</i-button>
                #end
            </div>-->
        </Row>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList&&!detail">
        <p slot="title">{{title}}</p>
        <i-form :model="order" :label-width="100">
            <Form-item>
                <i-button type="primary" @click="saveOrUpdate">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>

    <Card v-show="detail">
        <p slot="title" style="height: auto">
            {{title}}
        </p>
        <i-form ref="formValidate" :model="order" :label-width="80">
            <Form-item label="订单号" prop="orderSn">
                <i-input v-model="order.orderSn" readonly/>
            </Form-item>
            <Form-item label="会员" prop="userName">
                <i-input v-model="order.userName" readonly/>
            </Form-item>
            <Form-item label="订单状态" prop="orderStatus" readonly>
                <Radio-group v-model="order.orderStatus">
                    <Radio label="0" disabled>
                        <span>订单已完成</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>订单已取消</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>订单代付款</span>
                    </Radio>
                </Radio-group>
            </Form-item>

            <Form-item label="付款状态" prop="payStatus">
                <Radio-group v-model="order.payStatus">
                    <Radio label="0" disabled>
                        <span>待支付</span>
                    </Radio>
                    <Radio label="1" disabled>
                        <span>付款中</span>
                    </Radio>
                    <Radio label="2" disabled>
                        <span>已付款</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item label="收货人" prop="consignee">
                <i-input v-model="order.userName" readonly/>
            </Form-item>
            <Form-item label="收货地址" prop="address">
                <i-input v-model="order.detailInfo" readonly/>
            </Form-item>
            <Form-item label="联系电话" prop="mobile">
                <i-input v-model="order.telNumber" readonly/>
            </Form-item>
            <!--<Form-item label="付款方" prop="payName">
                <i-input v-model="order.payName" readonly/>
            </Form-item>-->
            <Form-item label="实际支付" prop="actualPrice">
                <i-input v-model="order.actualPrice" readonly/>
            </Form-item>
            <Form-item label="订单总价" prop="orderPrice">
                <i-input v-model="order.orderPrice" readonly/>
            </Form-item>
            <Form-item label="商品总价" prop="goodsPrice">
                <i-input v-model="order.goodsPrice" readonly/>
            </Form-item>
            <Form-item label="下单时间" prop="addTime">
                <Date-picker v-model="order.createTime" placeholder="下单时间" readonly/>
            </Form-item>
            <Form-item label="付款时间" prop="payTime">
                <Date-picker v-model="order.payTime" placeholder="付款时间" readonly/>
            </Form-item>
            <!--<Form-item label="配送费用" prop="freightPrice">
                <i-input v-model="order.freightPrice" readonly/>
            </Form-item>-->

            <Form-item>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>
                返回</i-button>
            </Form-item>
        </i-form>
    </Card>

</div>
<script src="${rc.contextPath}/js/shop/wxuserOrder.js?_${date.systemTime}"></script>
</body>
</html>